import { requestNew } from '@/utils/request'

// 种草个人主页
export async function getWantToBuyUser(data) {
  const res = await requestNew({
    url: '/zhong-cao/home',
    method: 'post',
    data
  })
  return res
}

// 种草个人心得体会
export async function getWantToBuyUserArticleList(data, isPraise = false) {
  const res = await requestNew({
    url: `/zhong-cao/${isPraise ? 'praise-' : ''}article`,
    method: 'post',
    data
  })
  return res
}

// 种草个人文章详情
export async function getWantToBuyArticleDetail(params) {
  const res = await requestNew({
    url: `/zhong-cao/get-article/${params.articleId}`,
    method: 'get'
  })
  return res
}
